package ycl.base.common.base.controller;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import ycl.base.common.ApiResult;
import ycl.base.common.base.entity.BaseRegionEntity;

import java.util.List;

/**
 * 区域控制器基类
 *
 * @author: YCL
 * @date: 2021-10-30 09:15:57
 */
@RestController
public abstract class BaseRegionController extends BaseController {


	@GetMapping("/getByCode")
	@ApiOperation("根据区域代码获取地区")
	@ApiOperationSupport(order = 21)
	public abstract ApiResult<? extends BaseRegionEntity> getByCode(String code);

	@GetMapping("/getByParentCode")
	@ApiOperation("根据上级区域代码获取地区")
	@ApiOperationSupport(order = 22)
	public abstract <T extends BaseRegionEntity> ApiResult<List<T>> getByParentCode(String code);

}
